package test11To20;

import java.util.*;

public class Test14 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        List<String> arr = new ArrayList<>(num);
        for (int i = 0; i < num; i++) {
            arr.add(scanner.next());
        }

        Collections.sort(arr);
        for (String s : arr) {
            System.out.println(s);
        }
    }
}
